cap log close
log using ${log}\06_wages_assessment_ceiling.log, replace


/*
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	
	SIAB Preparation
	
	Add contribution assessment ceiling (1975 - 2014)
	
	Generates the variable:
		- east: 1 if workplace in East Germany (incl. Berlin); 0 if West
		- limit_assess: contribution assessment ceiling
	
	Notes:
	In Germany there is a contribution assessment ceiling ("Beitragsbemessungsgrenze"). Hence, wages are right-cencored.
	The generation of the variable limit_assess is based on a FDZ-Arbeitshilfe (http://doku.iab.de/fdz/Bemessungsgrenzen_de_en.xls)
	Limits for the years 1975 - 2001 are converted from DM to EUR
	
	
	Author(s): Wolfgang Dauth, Johann Eppelsheimer
	
	Version: 1.0
	Created: 2018-06-01
	
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		
*/


********************************************************************************
* Generate east dummy (1 if WORKPLACE is in the eastern part of Germany; 0 if it is in the western part)
********************************************************************************
gen east = .
replace east = 1 if inlist(ao_bula, 11, 12, 13, 14, 15, 16)		// East: Berlin, Brandenburg, Mecklenburg-Western Pomerania, Saxony, Saxony-Anhalt, Thuringia
replace east = 0 if ao_bula < 11								// West: Schleswig-Holstein, Hamburg, Lower Saxony, Bremen, North Rhine-Westphalia, Hesse, Rhineland-Palatinate, Baden-Wuerttemberg, Bavaria, Saarland
label variable east "1 if workplace in East Germany (incl. Berlin); 0 if West"

tab ao_bula east


********************************************************************************
* Set exact assessment ceiling
********************************************************************************
gen limit_assess = .
global exch = 1/1.95583		// exchange rate (EUR/DM)


* West 1975 - 1991 (incl. Berlin):
replace limit_assess =  92.05*$exch if jahr == 1975
replace limit_assess = 101.64*$exch if jahr == 1976
replace limit_assess = 111.78*$exch if jahr == 1977
replace limit_assess = 121.64*$exch if jahr == 1978
replace limit_assess = 131.51*$exch if jahr == 1979
replace limit_assess = 137.70*$exch if jahr == 1980
replace limit_assess = 144.66*$exch if jahr == 1981
replace limit_assess = 154.52*$exch if jahr == 1982
replace limit_assess = 164.38*$exch if jahr == 1983
replace limit_assess = 170.49*$exch if jahr == 1984
replace limit_assess = 177.53*$exch if jahr == 1985
replace limit_assess = 184.11*$exch if jahr == 1986
replace limit_assess = 187.40*$exch if jahr == 1987
replace limit_assess = 196.72*$exch if jahr == 1988
replace limit_assess = 200.55*$exch if jahr == 1989
replace limit_assess = 207.12*$exch if jahr == 1990
replace limit_assess = 213.70*$exch if jahr == 1991

* West 1992 - 2001 (excl. Berlin):
replace limit_assess = 222.95*$exch if east == 0 & jahr == 1992
replace limit_assess = 236.71*$exch if east == 0 & jahr == 1993
replace limit_assess = 249.86*$exch if east == 0 & jahr == 1994
replace limit_assess = 256.44*$exch if east == 0 & jahr == 1995
replace limit_assess = 262.30*$exch if east == 0 & jahr == 1996
replace limit_assess = 269.59*$exch if east == 0 & jahr == 1997
replace limit_assess = 276.16*$exch if east == 0 & jahr == 1998
replace limit_assess = 279.45*$exch if east == 0 & jahr == 1999
replace limit_assess = 281.97*$exch if east == 0 & jahr == 2000
replace limit_assess = 286.03*$exch if east == 0 & jahr == 2001

* West 2002 - 2014 (excl. Berlin):
replace limit_assess = 147.95 if east == 0 & jahr == 2002
replace limit_assess = 167.67 if east == 0 & jahr == 2003
replace limit_assess = 168.85 if east == 0 & jahr == 2004
replace limit_assess = 170.96 if east == 0 & jahr == 2005
replace limit_assess = 172.60 if east == 0 & jahr == 2006
replace limit_assess = 172.60 if east == 0 & jahr == 2007
replace limit_assess = 173.77 if east == 0 & jahr == 2008
replace limit_assess = 177.53 if east == 0 & jahr == 2009
replace limit_assess = 180.82 if east == 0 & jahr == 2010
replace limit_assess = 180.82 if east == 0 & jahr == 2011
replace limit_assess = 183.61 if east == 0 & jahr == 2012
replace limit_assess = 190.68 if east == 0 & jahr == 2013
replace limit_assess = 195.62 if east == 0 & jahr == 2014
replace limit_assess = 195.62 if east == 0 & jahr == 2015
replace limit_assess = 195.62 if east == 0 & jahr == 2016
replace limit_assess = 195.62 if east == 0 & jahr == 2017
replace limit_assess = 195.62 if east == 0 & jahr == 2018
replace limit_assess = 195.62 if east == 0 & jahr == 2019
replace limit_assess = 195.62 if east == 0 & jahr == 2020
replace limit_assess = 195.62 if east == 0 & jahr == 2021
replace limit_assess = 195.62 if east == 0 & jahr == 2022



/*
	Note: after 1992 Berlin is assigned to East Germany
*/

* East 1992 - 2001 (incl. Berlin)
replace limit_assess = 157.38*$exch if east == 1 & jahr == 1992
replace limit_assess = 174.25*$exch if east == 1 & jahr == 1993
replace limit_assess = 193.97*$exch if east == 1 & jahr == 1994
replace limit_assess = 210.41*$exch if east == 1 & jahr == 1995
replace limit_assess = 222.95*$exch if east == 1 & jahr == 1996
replace limit_assess = 233.42*$exch if east == 1 & jahr == 1997
replace limit_assess = 230.14*$exch if east == 1 & jahr == 1998
replace limit_assess = 236.71*$exch if east == 1 & jahr == 1999
replace limit_assess = 232.79*$exch if east == 1 & jahr == 2000
replace limit_assess = 240.00*$exch if east == 1 & jahr == 2001

* East 2002 - 2014 (incl. Berlin)
replace limit_assess = 123.29 if east == 1 & jahr == 2002
replace limit_assess = 139.73 if east == 1 & jahr == 2003
replace limit_assess = 142.62 if east == 1 & jahr == 2004
replace limit_assess = 144.66 if east == 1 & jahr == 2005
replace limit_assess = 144.66 if east == 1 & jahr == 2006
replace limit_assess = 149.59 if east == 1 & jahr == 2007
replace limit_assess = 147.54 if east == 1 & jahr == 2008
replace limit_assess = 149.59 if east == 1 & jahr == 2009
replace limit_assess = 152.88 if east == 1 & jahr == 2010
replace limit_assess = 157.80 if east == 1 & jahr == 2011
replace limit_assess = 157.38 if east == 1 & jahr == 2012
replace limit_assess = 161.10 if east == 1 & jahr == 2013
replace limit_assess = 164.38 if east == 1 & jahr == 2014
replace limit_assess = 195.62 if east == 1 & jahr == 2015
replace limit_assess = 195.62 if east == 1 & jahr == 2016
replace limit_assess = 195.62 if east == 1 & jahr == 2017
replace limit_assess = 195.62 if east == 1 & jahr == 2018
replace limit_assess = 195.62 if east == 1 & jahr == 2019
replace limit_assess = 195.62 if east == 1 & jahr == 2020
replace limit_assess = 195.62 if east == 1 & jahr == 2021
replace limit_assess = 195.62 if east == 1 & jahr == 2022




********************************************************************************
* Label
********************************************************************************
label variable limit_assess "Contribution assessment ceiling"




log close
